#include <stdio.h>

#ifndef _BUF_SIZE
    #define _BUF_SIZE 512
#endif

char *p1, *p2;
int i, enterPos;
char iBuf[_BUF_SIZE], jBuf[_BUF_SIZE];

int firLine = 0;
char *bufArray[2] = { iBuf, jBuf };

void getLine()
{
    char * p;
    p1 = bufArray[firLine];
    if(firLine)
        p2 = bufArray[--firLine];
    else
        p2 = bufArray[++firLine];

    p = p2;
    for(int x = 0; (i = getchar()) != EOF; x++)
    {
        if(i == '\n')
        {
            enterPos = x;
            p[x] = 0;
            break;
        }
        p[x] = i;
    }
}

int main()
{
    while(i != -1)
    {
        enterPos = 0;
        getLine();
        if(enterPos && *p2 == '{')
            puts(p1);
    }
    return 0;
}
